<?php

namespace App\Http\Controllers;

use App\Common\Models\Db1\MpCallbackContent;
use App\Common\Models\Db1\MpGood;
use App\Common\Util;
use Illuminate\Http\Request;
use EasyWeChat\Factory;
use EasyWeChat;
use Log;

class GoodController extends Controller
{
    //
    public function list()
    {
        $rows = (new MpGood())->findAll(['on_sale' => 1], 0, 20, 'id desc');
        $ret = [
            'code' => 0,
            'msg' => '',
            'total' => 0,
            'data' =>
                $rows
        ];
        return Util::json_encode_unicode($ret);
    }
}
